<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,user-scalable=no, initial-scale=1">
		<title>客户详情</title>
		<link rel="stylesheet" type="text/css" href="/azxcrm/css/wap/aui.css" th:href="@{/azxcrm/css/wap/aui.css}" />
		<link rel="stylesheet" type="text/css" href="/azxcrm/css/wap/customer-info.css" th:href="@{/azxcrm/css/wap/customer-info.css}"/>
		<link rel="stylesheet" type="text/css" href="//at.alicdn.com/t/font_835360_5n3z54a5m1.css"/>
	</head>
	<body>
		<header class="aui-bar aui-bar-nav">
			 <a href="javascript:history.back(-1)"  class="aui-pull-left aui-btn">
	       		 <span class="iconfont icon-fanhui1">返回</span>
	    	</a>
		    <div class="aui-title">客户详情</div>
		</header>
		<div class="aui-info aui-margin-t-10 aui-padded-l-10 aui-padded-r-10">
		    <div class="aui-info-item">
		        <a href="javascript:;">
		        <img src="../../azxcrm/image/wap/moren.jpg" alt="image" style="width:3rem" class="aui-img-round" />
		        </a>
		        <span class="aui-margin-l-5" th:text="${clue.customerName}"></span>
		        <span th:if="${clue.customerSex}==2" class="iconfont icon-nv sex woman"></span>
		        <span th:if="${clue.customerSex}==1" class="iconfont icon-82 sex male"></span>
		    </div>    
		</div>
		<div class="aui-tab aui-border-b" id="tab">
            <div class="aui-tab-item aui-active">客户资料</div>
            <div class="aui-tab-item">拜访记录</div>
            <div class="aui-tab-item">销售订单</div>
        </div>
        
         <div class="aui-padded-5 " id="tab1-con">
        	<!--未审批-->
            <div id="tab1-con1">
				<section class="aui-grid aui-margin-b-15"> 
					<div class="aui-content aui-margin-b-15 g-box">
					    <ul class="aui-list aui-list-in">
					        <li class="aui-list-header">
					        	<h3><img src="../../azxcrm/image/wap/jbxx.png"/>
					          	 基本信息</h3>
					        </li>
					        <li class="aui-list-item">
					            <div class="aui-list-item-inner">
					            	<div class="clearfix">
					            		<div class="aui-list-item-title">年龄</div>	
					                	<div class="aui-text"><span th:text="${clue.customerAge}"></span></div>
					            	</div>
					            </div>
					        </li>
					        <li class="aui-list-item">
					            <div class="aui-list-item-inner">
					            	<div class="clearfix">
						                <div class="aui-list-item-title">职位</div>
						                <div class="aui-text"><span th:text="${clue.customerJob}"></span></div>
						            </div>    
					            </div>
					        </li>
					        <li class="aui-list-item">
					            <div class="aui-list-item-inner">
					            	<div class="clearfix">
						                <div class="aui-list-item-title">身份证号</div>
						                <div class="aui-text"><span th:text="${clue.customerIdentityNum}"></span></div>
					                </div>
					            </div>
					        </li>
					         <li class="aui-list-item">
					            <div class="aui-list-item-inner">
					            	<div class="clearfix g-div">
						                <div class="aui-list-item-title">所在地</div>
						                <div class="aui-text aui-jy local" th:text="${clue.customerProvince}+'-'+${clue.customerCity}+'-'+${clue.customerArea}+'-'+${clue.customerAddressDetail}"></div>
						            </div>    
					            </div>
					        </li>
					    </ul>
					</div>
					<div class="aui-content aui-margin-b-15 g-box">
					    <ul class="aui-list aui-list-in">
					        <li class="aui-list-header">
					        	<h3><img src="../../azxcrm/image/wap/lxfs.png"/>
					          	 联系方式</h3>
					        </li>
					        <li class="aui-list-item">
					            <div class="aui-list-item-inner">
					            	<div class="clearfix">
						                <div class="aui-list-item-title">手机号码 </div>	
						                <div class="aui-text"><span th:text="${clue.customerCellphone}"></span>
						                <a th:href="@{'tel:'+${clue.customerCellphone}}" class="iconfont icon-iconfontdianhua3 pos-ab" style="color: #ff8400;right: 0.4rem;top: 0.5rem;"></a>
						                </div>
					            	</div>
					            </div>
					        </li>
					        <li class="aui-list-item">
					            <div class="aui-list-item-inner">
					            	<div class="clearfix">
						                <div class="aui-list-item-title">座机号码</div>
						                <div class="aui-text"><span th:text="${clue.customerPhone}"></span></div>
						            </div>    
					            </div>
					        </li>
					        <li class="aui-list-item">
					            <div class="aui-list-item-inner">
					            	<div class="clearfix">
						                <div class="aui-list-item-title">微信号</div>
						                <div class="aui-text"><span th:text="${clue.customerWechatAccount}"></span></div>
						            </div>    
					            </div>
					        </li>
					    </ul>
					</div>
					<div class="aui-content aui-margin-b-15 g-box">
					    <ul class="aui-list aui-list-in">
					        <li class="aui-list-header">
					        	<h3><img src="../../azxcrm/image/wap/ckxx.png"/>
					          	 参课信息</h3>
					        </li>
					        <li class="aui-list-item">
					            <div class="aui-list-item-inner">
					            	<div class="clearfix g-div">
						                <div class="aui-list-item-title">参课信息</div>	
						                <div class="aui-text aui-jy" th:text="${dance} ==null?'-':${dance.attendanceTime}"></div>
						            </div>    
					            </div>
					        </li>
					       
					    </ul>
					</div>
				</section>
				<footer class="aui-bar aui-bar-tab" id="footer">
				    <a th:href="@{/wap/customer/editCustomer(clueId=${clue.clueId},status=2,orderId=0)}" class="aui-bar-tab-item btn">                   
				        <div class="aui-bar-tab-label">修改资料</div>
				    </a>  
				    <a th:href="@{/wap/customer/addRecord(clueId=${clue.clueId},status=2)}" class="aui-bar-tab-item">                   
				        <div class="aui-bar-tab-label">添加拜访记录</div>
				    </a> 
				    <a th:href="@{/wap/customer/addOrder(clueId=${clue.clueId},status=2)}" class="aui-bar-tab-item g-lastbtn">                   
				        <div class="aui-bar-tab-label">创建订单</div>
				    </a> 
			   </footer>
            </div>
            <!--已审批-->
            <div class="aui-hide" id="tab1-con2" >
            	<section class="aui-grid aui-margin-b-15 bfjl" >
					<div class="aui-content aui-margin-b-15 g-axb" th:if="${record}!=null" th:each="recordList : ${record}">
					    <ul class="aui-list aui-list-in">			       
					        <li class="aui-list-item">
					            <div class="aui-list-item-inner">
					            	<div class="clearfix g-div">
					            		<div class="aui-list-item-title phone_visit">
					            			<span th:text="${recordList.salesUserName}"></span>
					            			<span th:text="${recordList.visitType}"></span>了客户
					            		</div>
					            	</div>			                
					            </div>
					        </li>
					        <li class="aui-list-item">
					            <div class="aui-list-item-inner" style="color: #666666;">	
					            	<div class="clearfix g-div">
					            		<div class="aui-list-item-title" style="width: 24%;text-align: right;">拜访内容：</div>	
					                	<div class="aui-text aui-jy"><span th:text="${recordList.visitRecord}"></span></div>	
				                	</div>
					            </div>
					        </li>
					        <li class="aui-list-item">
					            <div class="aui-list-item-inner" style="color: #666666;">			            	
					            	  <div class="clearfix g-div">		            	
						            	   <div class="aui-list-item-title" style="width: 24%;text-align: right;">备注：</div>	
						                   <div class="aui-text aui-jy"><span th:text="${recordList.visitRemark}"></span></div>
					                  </div>			            			                
					            </div>
					        </li>
					        <li class="aui-list-item">
					            <div class="aui-list-item-inner">
					            	<div class="clearfix g-div">
					            		<div class="aui-list-item-title s-time"><span th:text="${recordList.visitTime}"></span></div>	
					            	</div>			                
					            </div>
					        </li>
					    </ul>
					</div>
				</section>
				<footer class="aui-bar aui-bar-tab" id="footer">
				    <a th:href="@{/wap/customer/editCustomer(clueId=${clue.clueId},status=2,orderId=0)}" class="aui-bar-tab-item btn">                   
				        <div class="aui-bar-tab-label">修改资料</div>
				    </a>  
				    <a th:href="@{/wap/customer/addRecord(clueId=${clue.clueId},status=2)}" class="aui-bar-tab-item">                   
				        <div class="aui-bar-tab-label">添加拜访记录</div>
				    </a> 
				    <a th:href="@{/wap/customer/addOrder(clueId=${clue.clueId},status=2)}" class="aui-bar-tab-item g-lastbtn">                   
				        <div class="aui-bar-tab-label">创建订单</div>
				    </a> 
			   </footer>
            </div>
                
            <div class="aui-hide" id="tab1-con3">
            	<section class="aui-grid aui-margin-b-15">
					<div class="aui-content aui-margin-b-15 g-axb" th:if="${record}!=null" th:each="erList : ${er}">
					    <ul class="aui-list aui-list-in g-ul">			       
					        <li class="aui-list-item">
					            <div class="aui-list-item-inner">
				            		<div class="aui-list-item-title" id="g-title"><span th:text="${erList.orderNum}"></span></div>	
				                	<div class="aui-text pos-rel state">订单类型：<span th:text="${erList.typeName}"></span></div>		                
					            </div>
					        </li>
					        <li class="aui-list-item">
					            <div class="aui-list-item-inner">
					            	<div class="clearfix g-background">
						                <div class="aui-list-item-title g-goods">关联商品：<span th:text="${erList.fullName}"></span></div>
						                <div class="aui-text g-jd">状态：<span th:if="${erList.orderStatus}==3">待审核</span>
						                	<span th:if="${erList.orderStatus}==4">审核被拒</span>
						                	<span th:if="${erList.orderStatus}==5">已成单</span>
						                	<span th:if="${erList.orderStatus}==6">已退单</span>
						                	<span th:if="${erList.orderStatus}==7">流单</span>
						                </div>
						            </div>    
					            </div>
					        </li>
					    </ul>
					</div>
	             </section>
	             <footer class="aui-bar aui-bar-tab" id="footer">
				    <a th:href="@{/wap/customer/editCustomer(clueId=${clue.clueId},status=2,orderId=0)}" class="aui-bar-tab-item btn">                   
				        <div class="aui-bar-tab-label">修改资料</div>
				    </a>  
				    <a th:href="@{/wap/customer/addRecord(clueId=${clue.clueId},status=2)}" class="aui-bar-tab-item">                   
				        <div class="aui-bar-tab-label">添加拜访记录</div>
				    </a> 
				    <a th:href="@{/wap/customer/addOrder(clueId=${clue.clueId},status=2)}" class="aui-bar-tab-item g-lastbtn">                   
				        <div class="aui-bar-tab-label">创建订单</div>
				    </a> 
			   </footer>
               </div>	
           </div>
	</body>
</html>
<script type="text/javascript" src="/azxcrm/js/wap/api.js" th:src="@{/azxcrm/js/wap/api.js}"></script>
<script type="text/javascript" src="/azxcrm/js/wap/aui-tab.js" th:src="@{/azxcrm/js/wap/aui-tab.js}"></script>
<script type="text/javascript">
        apiready = function(){api.parseTapmode();}
        var tab = new auiTab({
            element: document.getElementById("tab"),

        }, function(ret) {
            if (ret) {
                //定义获取对象的所有兄弟节点的函数，
                function siblings(elm) {
                    var a = [];
                    var p = elm.parentNode.children;
                    for (var i = 0, pl = p.length; i < pl; i++) {
                        if (p[i] !== elm) a.push(p[i]);
                    }
                    return a;
                }
                var index = ret.index;
                var activeC = document.getElementById("tab1-con" + index);
                activeC.className = "";
                for (var i = 0; i < siblings(activeC).length; i++) {
                    siblings(activeC)[i].className = "aui-hide";
                }
            }
        });
    </script>
